/*
 *    Copyright (c) 2018-2025, 云集汇通 All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yunjihuitong.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 */

package com.yjht.common.exception;

import lombok.Data;

/**
 * @author lengleng
 * @date 2018/6/11
 * 国际化异常
 */
@Data
public class LocalException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private String msg;
    private int code = 500;
    private Object[] params;

    public LocalException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public LocalException(String msg, Object... params) {
        super(msg);
        this.msg = msg;
        this.params = params;
    }

    public LocalException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public LocalException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}
